import Vue from 'vue'
import App from './App'
import {router, RouterMount} from '@/router' //路径换成自己的
import store from '@/store';
import {WsBizCallback} from "@/dispatch/biz_handler";
import {WsSocket} from '@/websocket/ws'
import * as msgConst from "@/common/msg_const"
import * as wsConst from "@/websocket/ws_const"
import * as vuexConst from "@/common/vuex.const"
import validate from "@/common/validate";

Vue.use(router);

Vue.config.productionTip = false;
Vue.prototype.$store = store;
Vue.prototype.$ws = new WsSocket(new WsBizCallback());
Vue.prototype.$validate = validate;
Vue.prototype.$msgConst=msgConst;
Vue.prototype.$wsConst = wsConst;
Vue.prototype.$vuexConst = vuexConst;
App.mpType = 'app';

const app = new Vue({
    store,
    ...App
});


//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
// #ifdef H5
RouterMount(app, router, '#app')
// #endif

// #ifndef H5
app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif
